#include<iostream>
#define LEAP_YEAR(y) y%4==0&&y%100!=0||y%400==0?'L':'N'
using namespace std;
int main(){
	int y;
	scanf("%d",&y);
	char a=LEAP_YEAR(y);
	putchar(a);
	return 0;
}
